Skip to content

Conversation

@kmuralidharan91
Copy link
Collaborator

@kmuralidharan91 kmuralidharan91 commented Sep 10, 2025

🚀 Add Team API with Slack Integration

📋 Overview

This PR introduces a new Team API v2 that provides team member data for both web and mobile applications, replacing the previous hardcoded approach with a unified API-driven solution. The implementation includes full Slack integration alongside existing LinkedIn and Twitter social links.

✨ Features Added

🔧 New API Endpoint

  • GET /api/v2/team - Returns complete team member information
  • Local image URLs for reliable team photo serving
  • Shuffled team order to ensure fair representation
  • Mobile-ready JSON structure matching existing app requirements

💬 Slack Integration

  • Slack DM URLs added to all team members
  • Slack icons displayed on team page alongside LinkedIn/Twitter
  • Consistent UI styling following project design guidelines
  • BoxIcons integration using bxl-slack icon

🎯 Web Integration

  • Team page now uses API instead of hardcoded data
  • Maintains existing functionality (shuffling, styling, responsive design)
  • Consistent data between web and mobile platforms

🏗️ Technical Changes

📁 Files Added

  • Sources/App/Features/Team/Models/TeamResponse.swift - API response models
  • Sources/App/Features/Team/Controllers/TeamAPIController.swift - Team API controller

📝 Files Modified

  • Sources/App/routes.swift - Added Team API v2 route registration
  • Sources/App/Features/Home/HomeRouteController.swift - Updated to use Team API
  • Sources/App/Context/HomeContext.swift - Added slack field to TeamMember model
  • Resources/Views/Team/_team.leaf - Added Slack icon display

🗑️ Files Removed

  • Sources/App/Features/Home/TeamMembers.swift - Replaced by API approach

📱 API Response Structure

{
  "teamMembers": [
    {
      "name": "Adam Rush",
      "role": "Founder and Host",
      "twitter": "https://twitter.com/Adam9Rush",
      "linkedin": "https://www.linkedin.com/in/swiftlyrush/",
      "slack": "https://swiftleedsworkspace.slack.com/archives/D05RK6AAV29",
      "imageURL": "/img/team/rush.jpg"
    }
  ]
}

🎨 UI Changes

Team Page Updates

  • Slack icons now appear alongside LinkedIn and Twitter icons
  • Consistent styling with existing social icons
  • Proper spacing and responsive design maintained
  • Hover effects and accessibility labels included

Icon Implementation

<a href="[slack-url]" class="btn btn-icon btn-secondary btn-slack btn-sm bg-white" aria-label="Slack">
  <i class="bx bxl-slack"></i>
</a>

📝 Mobile App Migration

Replace existing hardcoded team JSON with API call to:

https://swiftleeds.co.uk/api/v2/team

The response structure includes all existing fields plus the new slack field.

Before After
image image

@kmuralidharan91 kmuralidharan91 self-assigned this Sep 10, 2025
@kmuralidharan91 kmuralidharan91 added the enhancement New feature or request label Sep 10, 2025
@github-actions github-actions bot temporarily deployed to add-team-info September 10, 2025 21:41 Destroyed
Copy link
Collaborator

@Sherlouk Sherlouk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested on deployment, API v2 and team pages are returning as expected. Low Risk, RTD.

),
TeamMember(
name: "Matthew Gallagher",
role: "Registration and Mobile App",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably aught to revisit these roles since Oxley took over on Mobile App - but let's do that in a different PR.

@Sherlouk Sherlouk merged commit 308e8e3 into main Sep 12, 2025
2 checks passed
@Sherlouk Sherlouk deleted the add-team-info branch September 12, 2025 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants